package lab02.test36;

/**
 * Created by MECHREV on 2017/11/9.
 */
public class Test {
    public static void main(String[] args) {

        Stduent[] stduents=new Stduent[5];
        stduents[0] =new Undergraduate();
        stduents[0].name="张三";
        stduents[0].type="本科生";
        stduents[0].socres[0]=90;
        stduents[0].socres[1]=95;
        stduents[0].socres[2]=100;

        stduents[1] =new Undergraduate();
        stduents[1].name="赵六";
        stduents[1].type="本科生";
        stduents[1].socres[0]=75;
        stduents[1].socres[1]=82;
        stduents[1].socres[2]=87;

        stduents[2] =new Postgraduate();
        stduents[2].name="王五";
        stduents[2].type="研究生";
        stduents[2].socres[0]=82;
        stduents[2].socres[1]=85;
        stduents[2].socres[2]=88;

        stduents[3] =new Postgraduate();
        stduents[3].name="陈七";
        stduents[3].type="研究生";
        stduents[3].socres[0]=80;
        stduents[3].socres[1]=82;
        stduents[3].socres[2]=84;

        stduents[4] =new Undergraduate();
        stduents[4].name="李四";
        stduents[4].type="本科生";
        stduents[4].socres[1]=85;
        stduents[4].socres[0]=80;
        stduents[4].socres[2]=90;
        System.out.println("姓名  类型   成绩");
        for (int i=0;i<stduents.length;i++){
            System.out.println(stduents[i].name+"  "+
            stduents[i].type+"  "
            +stduents[i].calGrade());
        }

    }
}
